<div>
  <!-- 添加分类 -->
  <el-button @click="openAddCalDialog" type="success" plain>添加分类</el-button>
  <!-- 商品分类列表 -->
  <el-table :data="categoriesList" style="width: 100%">
    <el-table-tree-column file-icon="icon icon-file" folder-icon="icon icon-folder" prop="cat_name" label="分类名称"
      tree-key="cat_id" parent-key="cat_pid" level-key="cat_level" :indent-size='30' width="180"></el-table-tree-column>
    <!-- <el-table-column prop="cat_name" label="分类名称" width="180">
    </el-table-column> -->
    <el-table-column label="是否有效" width="180">
      <template slot-scope="scope">
        <span>{{scope.row.cat_deleted ? '否' : '是'}}</span>
      </template>
    </el-table-column>
    <el-table-column prop="cat_level" label="层级" width="375">
    </el-table-column>
    <el-table-column label="操作">
      <template slot-scope="scope">
        <el-button icon="el-icon-edit" type="primary" size="mini" plain></el-button>
        <el-button icon="el-icon-delete" type="danger" size="mini" plain></el-button>
      </template>
    </el-table-column>
  </el-table>
  <!-- 添加分类对话框 -->
  <el-dialog title="添加分类" :visible.sync="dialogAddCatVisible" @close="closeAddCal">
    <el-form :model="addCatForm" label-width="100px" ref="addCatForm">
      <el-form-item label="分类名称" prop='cat_name'>
        <el-input v-model="addCatForm.cat_name" autocomplete="off"></el-input>
      </el-form-item>
      <el-form-item label="父级名称" prop="cat_pid_arr">
        <el-cascader :options="secondCalOptions" change-on-select :props="{label:'cat_name',value:'cat_id'}" v-model="addCatForm.cat_pid_arr"></el-cascader>
      </el-form-item>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button @click="dialogAddCatVisible = false">取 消</el-button>
      <el-button type="primary" @click="addCategoryBtn">确 定</el-button>
    </div>
  </el-dialog>
  <!-- 分页 -->
  <el-pagination @current-change="pageChange" background layout="prev, pager, next" :total="total" :page-size="4">
  </el-pagination>
</div>
